package ch9;

import java.util.Scanner;

public class Zxf13 {
    public static void main(String[] args) {
        int[] a=new int[6];
        Scanner in=new Scanner(System.in);
        System.out.println("输入数组数据：");
        for (int i=0; i<a.length;i++){
            a[i]=in.nextInt();
        }//输出数组数据；
        int j=a.length-1;
        for (int i=0;i<a.length&&j>=0;i++,j--){
            if (i<=j) {
                int t = a[i];
                a[i] = a[j];
                a[j] = t;
            }//a[0]与a[6];a[1]与a[5];a[2]与a[4]......交换；
            System.out.println(a[i]);

        }
    }
}
